package provider.service.impl;

/**
 * Created by 峥桂 on 2017/9/13.
 */

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import provider.entity.Order;
import provider.model.OrderModel;
import provider.service.OrderService;

import java.util.Date;


@Service
public class OrderServiceImpl implements OrderService {
    public OrderModel findOrderByOrderId(Long orderId) {
        OrderModel orderModel = new OrderModel();
        if (orderId.equals(2L)) {
            Order order = new Order();
            order.setCreateTime(new Date());
            order.setOrderNo(2L);
            BeanUtils.copyProperties(order, orderModel);
        }
        return orderModel;
    }

}